package com.weimei.conversionTreasure.viewModel;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.weimei.conversionTreasure.http.entity.TabOneEntity;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.base.ItemViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;
import me.goldze.mvvmhabit.binding.command.BindingConsumer;
import me.goldze.mvvmhabit.utils.ToastUtils;

public class MarketItemVM extends ItemViewModel {
    public ObservableField<TabOneEntity> bean = new ObservableField<>();

    public MarketItemVM(@NonNull BaseViewModel viewModel, TabOneEntity entity) {
        super(viewModel);
        bean.set(entity);
        if (entity.isSel){
        }
    }


    public BindingCommand itemClick = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            ToastUtils.showShort(bean.get().tabStr+"-"+bean.get().hashCode());
            bean.get().isSel = true;

        }
    });



}
